//
//  Extension+UIView.swift
//  BQWB
//
//  Created by laibingqiang on 16/10/31.
//  Copyright © 2016年 laibingqiang. All rights reserved.
//

import UIKit


extension UIView{
    
    var size:CGSize{
        
        get{
            
            return self.frame.size
            
        }set{
            
            self.frame.size = newValue
        }
    }
    var  x:CGFloat{
        get{
            return frame.origin.x
        }set{
            
            frame.origin.x = newValue
        }
        
    }
    
    var y:CGFloat{
        get{
            return frame.origin.y
        }set{
            
            frame.origin.y = newValue
        }
        
    }
    
    var width:CGFloat{
        
        get{
            return frame.size.width
        }set{
            frame.size.width = newValue
        }
    }
    var height:CGFloat{
        
        get{
            return frame.size.height
        }set{
            frame.size.height = newValue
        }
    }
    
    var centerX:CGFloat{
        get{
            return center.x
        }set{
            
            center.x = newValue
        }
    }
    
    var centerY:CGFloat{
        get{
            return center.y
        }set{
            center.y = newValue
        }
    }
}
